RDKB-64347: Fixing coverity issues#1096
RDKB-64347: Fixing coverity issues#1096bharathivelp wants to merge 1 commit intordkcentral:developfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses Coverity-reported issues across WiFi monitoring, webconfig consumer logging, and the WiFi blaster active-measurement flow.
Changes:
- Removes an ineffective/null check and simplifies disconnect cleanup logic in associated-client stats collection.
- Adjusts STA connection status log formatting in the webconfig consumer.
- Avoids holding the blaster mutex while collecting (potentially slow) system health stats by restructuring the resource-gathering condition.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
source/stats/wifi_stats_assoc_client.c |
Removes dead/null logic, tweaks disconnect removal condition, and adds a sta_map NULL guard before event building. |
source/sampleapps/webconfig_consumer_apis.c |
Updates STA connect/disconnect printf formats. |
source/apps/blaster/wifi_blaster.c |
Refactors resource collection into a resource_ok boolean and releases the mutex during resource collection. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
157bd13 to
13211a6
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
a04e6b5 to
6bcb5ab
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6bcb5ab to
100fb87
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
100fb87 to
78e2ae2
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d9fe651 to
f54cf35
Compare
f54cf35 to
0b4e4a6
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0b4e4a6 to
5d5a08c
Compare
26bde9b to
2518f8f
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2518f8f to
e24348c
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| csifptr = fopen(CSI_FILE, "r"); | ||
|
|
||
| /* Secure temp file */ | ||
| mode_t old_umask = umask(0077); |
There was a problem hiding this comment.
Mask should be only RW for the group and the user. (0066)
e24348c to
14017f9
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| p_data->raw_data_len = bytes_size; | ||
|
|
||
| } else if (strcmp(extension, "Bssid") == 0) { | ||
| } else if (strncmp(name + nlen - strlen("Bssid"), "BSSID", strlen("Bssid")) == 0) { |
| printf("%s:%d: Station disconnected with external AP:%d radio:%u\r\n", | ||
| __func__, __LINE__, conn_status, index - 1); |
14017f9 to
1e2dbd4
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| printf("%s:%d Rbus event name=%s\n",__FUNCTION__, __LINE__, event->name); | ||
|
|
||
| sscanf(event->name, "Device.WiFi.STA.%d.InterfaceName", &index); | ||
| if (sscanf(event->name, "Device.WiFi.STA.%d.InterfaceName", &index) != 1) { |
| if (sscanf(name, "Device.WiFi.STA.%u.", &index) != 1) { | ||
| wifi_util_error_print(WIFI_CTRL, "%s Failed to parse STA index from %s\n", __FUNCTION__, name); | ||
| return bus_error_invalid_input; | ||
| } | ||
|
|
||
| sscanf(name, "Device.WiFi.STA.%d.%s", &index, extension); | ||
| if (index > getNumberRadios()) { | ||
| wifi_util_error_print(WIFI_CTRL, "%s Invalid index %d\n", __FUNCTION__, index); | ||
| if (index == 0 || index > getNumberRadios()) { | ||
| wifi_util_error_print(WIFI_CTRL, "%s Invalid index %u\n", __FUNCTION__, index); | ||
| return bus_error_invalid_operation; | ||
| } | ||
|
|
||
| vap_map = &mgr->radio_config[(index - 1)].vaps.vap_map; | ||
| vap_index = get_sta_vap_index_for_radio(&mgr->hal_cap.wifi_prop, index - 1); | ||
|
|
||
| if (strcmp(extension, "Connection.Status") == 0) { | ||
| if (strncmp(name + nlen - strlen("Connection.Status"), "Connection.Status", strlen("Connection.Status")) == 0) { |
1e2dbd4 to
c9a7f32
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /* ---- Connection.Status ---- */ | ||
| if (strncmp(attr, "Connection.Status", strlen("Connection.Status")) == 0) { |
000804a to
d2b21dd
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| sscanf(name, "Device.WiFi.STA.%d.%s", &index, extension); | ||
| if (index > getNumberRadios()) { | ||
| wifi_util_error_print(WIFI_CTRL, "%s Invalid index %d\n", __FUNCTION__, index); | ||
| /* WiFi */ |
There was a problem hiding this comment.
change not needed since low priority
Reason for change: Fixing Low priority Coverity issues. Test Procedure: Build should be successful and the regression test should also succeed. Risks: Low Priority: P1 Signed-off-by: [email protected]
d2b21dd to
f865f95
Compare
Reason for change: Fixing Low priority coverity issues.
Test Procedure: Build should be successful and the regression test should also succeed.
Risks: Low
Priority: P1
Signed-off-by: [email protected]